#include "taskFlyport.h"
#include "mrf24fj40ma.h"

#define MRF24J40_INT   	p4
void FlyportTask()
{	int b,m; char buf[10];
	WFConnect(WF_DEFAULT);
	while (WFStatus != CONNECTED);
	UARTWrite(1,"Flyport connected... hello world!\r\n");
	
	
	mrf24j40ma_init();
	Set_Device_MAC_PANID(EADR0,EADR1,EADR2,EADR3,EADR4,EADR5,EADR6,EADR7,PANIDH,PANIDL,SADRH,SADRL);
	GET_Device_MAC_PANID();
	GET_Device_MAC_PANID();
	DelayMs(1);
	while(1)
	{
		if(IOGet(MRF24J40_INT))
		{//UARTWrite(1,"INT set\r\n");
		check_interrupt();
			}
	//MRF24J40Process();
	DelayMs(1);
	}
}
